// #define print(...)
#include "sort.h"

class Solution {
public:
    int maxIceCream(vector<int>& costs, int coins) {
        QuickSort(costs);
        int cnt = 0;
        while(cnt<costs.size()){
            coins -= costs[cnt];
            if(coins < 0) break;
            cnt++;
        }
        return cnt;
    }
};
